<template>
  <div id="app">
    <router-link to='/counter'
                 tag='button'>counter</router-link>
    <router-link to='/user'
                 tag='button'>user</router-link><br>
    <button style='backgroundColor: yellow; width:50px; height: 30px;'
            @click='bianse("yellow")'></button>
    <button style='backgroundColor: green; width:50px; height: 30px;'
            @click='bianse("green")'></button>
    <router-view></router-view>
  </div>
</template>

<script>
import { mapMutations } from 'vuex'
export default {
  methods: {
    ...mapMutations('bgc', {
      bianse: 'bianse'
    })
    // bianses (color) {
    //   this.$store.commit('bgc/bianse', color)
    // }
  }
}
</script>

<style>
  html,body {
    height: 100%;
  }
  #app {
    height: 100%;
  }
</style>
